package s2elinshu;

public class J12Ch04Ex01song {
	public static void main(String[] args) {
		Song LetItGo = new Song();
		LetItGo.title = "Let It Go";
		LetItGo.artist = "Idina Menzel";
		LetItGo.album = "Frozen OST";
		LetItGo.composer[1] = "Various Artist";
		LetItGo.composer[2] = "Various Artist";
		LetItGo.year = "2013.12.02";
		LetItGo.track = 5;

		LetItGo.show(); // 곡 출력

	} // main닫음
} // J12Ch04Ex01song class 닫음

class Song {
	String title;
	String artist;
	String album;
	String composer[]=new String[3]; // 값이 여럿일 경우 배열을 사용
	String year;
	int track;

	public void show() {
		System.out.println(title);
		System.out.println(artist);
		if(composer != null){
		for (int i = 1; i < composer.length; ++i) {
			System.out.println(composer[i]);
		}
		}
		System.out.println(year);
		System.out.println(track);
	} // show 닫음
} // Song class 닫음